3.4.26 \(\int \frac {(1+x)^{3/2} (1-x+x^2)^{3/2}}{x} \, dx\)

Optimal. Leaf size=94 \[ \frac {2}{3} \sqrt {x+1} \sqrt {x^2-x+1}+\frac {2}{9} \sqrt {x+1} \sqrt {x^2-x+1} \left (x^3+1\right )-\frac {2 \sqrt {x+1} \sqrt {x^2-x+1} \tanh ^{-1}\left (\sqrt {x^3+1}\right )}{3 \sqrt {x^3+1}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {915, 266, 50, 63, 207} \begin {gather*} \frac {2}{9} \sqrt {x+1} \sqrt {x^2-x+1} \left (x^3+1\right )+\frac {2}{3} \sqrt {x+1} \sqrt {x^2-x+1}-\frac {2 \sqrt {x+1} \sqrt {x^2-x+1} \tanh ^{-1}\left (\sqrt {x^3+1}\right )}{3 \sqrt {x^3+1}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((1 + x)^(3/2)*(1 - x + x^2)^(3/2))/x,x]

[Out]

(2*Sqrt[1 + x]*Sqrt[1 - x + x^2])/3 + (2*Sqrt[1 + x]*Sqrt[1 - x + x^2]*(1 + x^3))/9 - (2*Sqrt[1 + x]*Sqrt[1 -
x + x^2]*ArcTanh[Sqrt[1 + x^3]])/(3*Sqrt[1 + x^3])

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 915

Int[((g_.)*(x_))^(n_)*((d_.) + (e_.)*(x_))^(m_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[((d
 + e*x)^FracPart[p]*(a + b*x + c*x^2)^FracPart[p])/(a*d + c*e*x^3)^FracPart[p], Int[(g*x)^n*(a*d + c*e*x^3)^p,
 x], x] /; FreeQ[{a, b, c, d, e, g, m, n, p}, x] && EqQ[m - p, 0] && EqQ[b*d + a*e, 0] && EqQ[c*d + b*e, 0]

Rubi steps

\begin {align*} \int \frac {(1+x)^{3/2} \left (1-x+x^2\right )^{3/2}}{x} \, dx &=\frac {\left (\sqrt {1+x} \sqrt {1-x+x^2}\right ) \int \frac {\left (1+x^3\right )^{3/2}}{x} \, dx}{\sqrt {1+x^3}}\\ &=\frac {\left (\sqrt {1+x} \sqrt {1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {(1+x)^{3/2}}{x} \, dx,x,x^3\right )}{3 \sqrt {1+x^3}}\\ &=\frac {2}{9} \sqrt {1+x} \sqrt {1-x+x^2} \left (1+x^3\right )+\frac {\left (\sqrt {1+x} \sqrt {1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {1+x}}{x} \, dx,x,x^3\right )}{3 \sqrt {1+x^3}}\\ &=\frac {2}{3} \sqrt {1+x} \sqrt {1-x+x^2}+\frac {2}{9} \sqrt {1+x} \sqrt {1-x+x^2} \left (1+x^3\right )+\frac {\left (\sqrt {1+x} \sqrt {1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,x^3\right )}{3 \sqrt {1+x^3}}\\ &=\frac {2}{3} \sqrt {1+x} \sqrt {1-x+x^2}+\frac {2}{9} \sqrt {1+x} \sqrt {1-x+x^2} \left (1+x^3\right )+\frac {\left (2 \sqrt {1+x} \sqrt {1-x+x^2}\right ) \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+x^3}\right )}{3 \sqrt {1+x^3}}\\ &=\frac {2}{3} \sqrt {1+x} \sqrt {1-x+x^2}+\frac {2}{9} \sqrt {1+x} \sqrt {1-x+x^2} \left (1+x^3\right )-\frac {2 \sqrt {1+x} \sqrt {1-x+x^2} \tanh ^{-1}\left (\sqrt {1+x^3}\right )}{3 \sqrt {1+x^3}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.30, size = 201, normalized size = 2.14 \begin {gather*} \frac {\sqrt {x+1} \left (\frac {2}{9} \left (x^2-x+1\right ) \left (x^3+4\right )+\frac {i \sqrt {2} \sqrt {\frac {-2 i x+\sqrt {3}+i}{\sqrt {3}+3 i}} \sqrt {\frac {2 i x+\sqrt {3}-i}{\sqrt {3}-3 i}} \Pi \left (\frac {3}{2}-\frac {i \sqrt {3}}{2};i \sinh ^{-1}\left (\sqrt {2} \sqrt {-\frac {i (x+1)}{3 i+\sqrt {3}}}\right )|\frac {3 i+\sqrt {3}}{3 i-\sqrt {3}}\right )}{\sqrt {-\frac {i (x+1)}{\sqrt {3}+3 i}}}\right )}{\sqrt {x^2-x+1}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((1 + x)^(3/2)*(1 - x + x^2)^(3/2))/x,x]

[Out]

(Sqrt[1 + x]*((2*(1 - x + x^2)*(4 + x^3))/9 + (I*Sqrt[2]*Sqrt[(I + Sqrt[3] - (2*I)*x)/(3*I + Sqrt[3])]*Sqrt[(-
I + Sqrt[3] + (2*I)*x)/(-3*I + Sqrt[3])]*EllipticPi[3/2 - (I/2)*Sqrt[3], I*ArcSinh[Sqrt[2]*Sqrt[((-I)*(1 + x))
/(3*I + Sqrt[3])]], (3*I + Sqrt[3])/(3*I - Sqrt[3])])/Sqrt[((-I)*(1 + x))/(3*I + Sqrt[3])]))/Sqrt[1 - x + x^2]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 48.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(1+x)^{3/2} \left (1-x+x^2\right )^{3/2}}{x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((1 + x)^(3/2)*(1 - x + x^2)^(3/2))/x,x]

[Out]

Defer[IntegrateAlgebraic][((1 + x)^(3/2)*(1 - x + x^2)^(3/2))/x, x]

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 65, normalized size = 0.69 \begin {gather*} \frac {2}{9} \, {\left (x^{3} + 4\right )} \sqrt {x^{2} - x + 1} \sqrt {x + 1} - \frac {1}{3} \, \log \left (\sqrt {x^{2} - x + 1} \sqrt {x + 1} + 1\right ) + \frac {1}{3} \, \log \left (\sqrt {x^{2} - x + 1} \sqrt {x + 1} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)^(3/2)*(x^2-x+1)^(3/2)/x,x, algorithm="fricas")

[Out]

2/9*(x^3 + 4)*sqrt(x^2 - x + 1)*sqrt(x + 1) - 1/3*log(sqrt(x^2 - x + 1)*sqrt(x + 1) + 1) + 1/3*log(sqrt(x^2 -
x + 1)*sqrt(x + 1) - 1)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (x^{2} - x + 1\right )}^{\frac {3}{2}} {\left (x + 1\right )}^{\frac {3}{2}}}{x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)^(3/2)*(x^2-x+1)^(3/2)/x,x, algorithm="giac")

[Out]

integrate((x^2 - x + 1)^(3/2)*(x + 1)^(3/2)/x, x)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 57, normalized size = 0.61 \begin {gather*} -\frac {2 \sqrt {x +1}\, \sqrt {x^{2}-x +1}\, \left (-\sqrt {x^{3}+1}\, x^{3}+3 \arctanh \left (\sqrt {x^{3}+1}\right )-4 \sqrt {x^{3}+1}\right )}{9 \sqrt {x^{3}+1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x+1)^(3/2)*(x^2-x+1)^(3/2)/x,x)

[Out]

-2/9*(x+1)^(1/2)*(x^2-x+1)^(1/2)*(-x^3*(x^3+1)^(1/2)+3*arctanh((x^3+1)^(1/2))-4*(x^3+1)^(1/2))/(x^3+1)^(1/2)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (x^{2} - x + 1\right )}^{\frac {3}{2}} {\left (x + 1\right )}^{\frac {3}{2}}}{x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)^(3/2)*(x^2-x+1)^(3/2)/x,x, algorithm="maxima")

[Out]

integrate((x^2 - x + 1)^(3/2)*(x + 1)^(3/2)/x, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (x+1\right )}^{3/2}\,{\left (x^2-x+1\right )}^{3/2}}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x + 1)^(3/2)*(x^2 - x + 1)^(3/2))/x,x)

[Out]

int(((x + 1)^(3/2)*(x^2 - x + 1)^(3/2))/x, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (x + 1\right )^{\frac {3}{2}} \left (x^{2} - x + 1\right )^{\frac {3}{2}}}{x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+x)**(3/2)*(x**2-x+1)**(3/2)/x,x)

[Out]

Integral((x + 1)**(3/2)*(x**2 - x + 1)**(3/2)/x, x)

________________________________________________________________________________________